<template>
	<view>
		<!-- 		<view id="head">
			<text class="headicon">返回</text>
			<text class="headtext">会议详情</text>
			<text class="headicon"></text>
		</view> -->
		<view id="mian">
			<view class="itemlist">
				<view class="item">
					<text class="iconfont icon-fuzhushuxian" id="blueline"></text>
					<text>发起人信息</text>
					<view class="hr"></view>
				</view>
				<view>
					<view class="item">
						<view class="space-between">
							<text>流水号</text>
							<text>{{tabledate.meeting_num}}</text>
						</view>
						<view class="hr"></view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>姓名</text>
							<text>{{admindate.name}}</text>
						</view>
						<view class="hr"></view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>部门</text>
							<text>{{admindate.department_name}}</text>
						</view>
						<view class="hr"></view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>岗位</text>
							<text>{{admindate.post_name}}</text>
						</view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>发起时间</text>
							<text>{{tabledate.meeting_todotime}}</text>
						</view>
					</view>
				</view>
			</view>
			<view class="itemlist">
				<view class="item">
					<text class="iconfont icon-fuzhushuxian" id="blueline"></text>
					<text>会议信息</text>
					<view class="hr"></view>
				</view>
				<view>
					<view class="item">
						<view class="space-between">
							<text>会议标题</text>
							<text>{{tabledate.meeting_tit}}</text>
						</view>
						<view class="hr"></view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>会议内容</text>
							<text>{{tabledate.meeting_cont}}</text>
						</view>
						<view class="hr"></view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>会议室名称</text>
							<text>{{meetroomdate.metroom_name}}</text>
						</view>
						<view class="hr"></view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>会议开始时间</text>
							<text>{{tabledate.meeting_startime}}</text>
						</view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>会议结束时间</text>
							<text>{{tabledate.meeting_endtime}}</text>
						</view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>标准人数</text>
							<text>{{meetroomdate.metroom_standard}}</text>
						</view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>最大容纳人数</text>
							<text>{{meetroomdate.metroom_capacity}}</text>
						</view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>会议室设备</text>
							<text>{{meetroomdate.tyy}}\{{meetroomdate.mb}}\{{meetroomdate.ht}}</text>
						</view>
					</view>
					<view class="item">
						<view class="space-between">
							<text>参会人数</text>
							<text>{{tabledate.meeting_pernum}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		computed,
		reactive,
		toRefs,
		toRef,
		onMounted
	} from 'vue';
	import $http from '../../utils/http.js'
	export default {
		setup(props,context) {
			 // const title = toRef(props, 'index')
			  // console.log(props,context)
			let data = reactive({
				tabledate: [],
				admindate: [],
				meetroomdate: [],
				index:0,
				getdate:()=>{
					$http({
							url: '/Meetmanagement/meeting/get',
							data: {}
						}).then((res) => {
							console.log(res)
							data.tabledate = res.data.data[data.index]
							
						}),
						$http({
							url: '/Meetmanagement/admin/get',
							method: 'post',
							data: {
								'userid': '200001'
							}
						}).then((res) => {
							data.admindate = res.data.data[0]
							console.log(res)
							console.log(data.admindate)
						}),
						$http({
							url: '/Meetmanagement/meetingroomdetail/get',
							data: {
								'meetroom_id': 3
							}
						}).then((res) => {
							data.meetroomdate = res.data.data[0]
							console.log(res)
							// console.log(data.meetroomdate)
						})
				}
			})

			onMounted((option) => {
				// console.log(option)
				data.getdate()


			})
			return {
				...toRefs(data)
			}
		},
		onShow() {
			// console.log(option)
			this.getdate()
		
		
		},
		onLoad: function (option) { //option为object类型，会序列化上个页面传递的参数
				console.log(option.index); //打印出上个页面传递的参数。
				this.index=option.index
			}
		
	}
</script>

<style>
	@import url("~@/static/font/iconfont.css");

	#mian {
		background-color: #F2F2F2;
		padding: 24rpx 36rpx;
	}

	#head {
		height: 90rpx;
		display: flex;
		justify-content: space-between;
		padding: 0rpx 36rpx;
		align-items: center;
	}

	.itemlist {
		border-radius: 20rpx;
		background-color: #FFFFFF;
		padding: 0 30rpx;
		margin-bottom: 24rpx;
	}

	.item {
		height: 100rpx;
		line-height: 100rpx;
	}

	.meetimg {
		width: 200rpx;
		height: 120rpx;
	}

	#blueline {
		color: #0000FF;
	}

	.space-between {
		display: flex;
	}

	.space-between>text:nth-of-type(1) {
		flex: 1;
	}

	.space-between>text:nth-of-type(2) {
		flex: 2;
	}

	.hr {
		height: 1rpx;
		background-color: #F5F2F0;
	}
</style>
